package com.acmetelecom.core;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;

import com.acmetelecom.core.DaytimePeakPeriod;

public class DaytimePeakPeriodTest {

	private DaytimePeakPeriod peakPeriod;
	
	@Before
	public void before() {
		peakPeriod = new DaytimePeakPeriod();
	}
	
	@Test
	public void testPeakTime() {
		DateTime time = new DateTime(2011, 8, 23, 12, 30, 0);
		assertFalse(peakPeriod.offPeak(time ));
	}
	
	@Test
	public void testOffPeakTime() {
		DateTime time = new DateTime(2011, 8, 23, 22, 30, 0);
		assertTrue(peakPeriod.offPeak(time ));
	}
}
